const express = require('express');
const router = express.Router();
const path = require('path');

const publicDir = path.resolve(__dirname, '../../public');

router.get('/register',(req,res)=>{
    try{
        res.sendFile(path.join(publicDir,'register.html'))
    }catch(err){
        console.log(err);
    }
})
router.get('/login',(req,res)=>{
    try{
        res.sendFile(path.join(publicDir,'login.html'))
    }catch(err){
        console.log(err);
    }
})
router.get('/create',(req,res)=>{
    try{
        res.sendFile(path.join(publicDir,'eventform.html'))
    }catch(err){
        console.log(err);
        
    }
})
router.get('/event',(req,res)=>{
    try{
        res.sendFile(path.join(publicDir,'eventlist.html'))
    }catch(err){
        console.log(err);
    }
})


module.exports = router;